/****** Object:  Table [dbo].[aircraftSeat]    ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[aircraftSeat](
	[aircraftSeatId] [int] IDENTITY(1,1) NOT NULL,
	[aircraftId] [int] NULL,
	[seatTypeCode] [nchar](10) NULL,
	[seatNo] [nchar](10) NULL,
	[seatRow] [int] NULL,
	[seatColumn] [nchar](2) NULL,
	[isWindowSeat] [bit] NULL,
	[isAisleSeat] [bit] NULL,
	[rewardpoint] [float] NULL,
 CONSTRAINT [PK_aircraftSeat] PRIMARY KEY CLUSTERED 
(
	[aircraftSeatId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[aircraftSeat]  WITH CHECK ADD  CONSTRAINT [FK_aircraftSeat_aircraft] FOREIGN KEY([aircraftId])
REFERENCES [dbo].[aircraft] ([aircraftId])
GO

ALTER TABLE [dbo].[aircraftSeat] CHECK CONSTRAINT [FK_aircraftSeat_aircraft]
GO

ALTER TABLE [dbo].[aircraftSeat]  WITH CHECK ADD  CONSTRAINT [FK_aircraftSeat_seatType] FOREIGN KEY([seatTypeCode])
REFERENCES [dbo].[seatType] ([seatTypeCode])
GO

ALTER TABLE [dbo].[aircraftSeat] CHECK CONSTRAINT [FK_aircraftSeat_seatType]
GO

